import request from '@/utils/request'
import querystring from 'querystring'

/**
 * 已收款列表查询
 * @param {*} form 
 * @param {*} pageSize 
 * @param {*} currentPage 
 */
export function receiptRecordList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/receiptRecord/page',data)
}
/**
 * 新增收款
 * @param {*} options 
 */
export function addReceiptRecord(options) {
  return request.post('/receiptRecord/save', options)
}

/**
 * 待收款列表查询
 * @param {*} form 
 * @param {*} pageSize 
 * @param {*} currentPage 
 */
 export function receiptDueList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/receiptDue/page',data)
}

/**
 * 销售发票列表查询
 * @param {*} form 
 * @param {*} pageSize 
 * @param {*} currentPage 
 */
 export function salesInvoiceList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/salesInvoice/page',data)
}


/**
 * 代收款开票新增发票
 * @param {*} options 
 */
 export function addSalesInvoice(options) {
  return request.post('/salesInvoice/save', options)
}

/**
 * 查询收款历史
 * @param {*} options 
 */
 export function receiptDueHistory(id) {
  return request.get(`/receiptDue/history/${id}`)
}




